/*
* This file is a part of the open-eBackup project.
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*
* Copyright (c) [2024] Huawei Technologies Co.,Ltd.
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
*/
#ifndef HETRO_COMMONSTRUCT_H
#define HETRO_COMMONSTRUCT_H

#include "constant/PluginConstants.h"

struct EnvAuthExtendInfo {
    std::string m_fingerPrint {};

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fingerPrint, fingerPrint)
    END_SERIAL_MEMEBER
};

struct ApplicationEnvExtent {
    std::string  m_verifyStatus {};
    std::string m_snapConsistency {};
    std::string m_managerIPs;
    std::string m_wwn {};

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_verifyStatus, verifyStatus)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_snapConsistency, snapConsistency)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_managerIPs, managerIPs)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_wwn, wwn)
    END_SERIAL_MEMEBER
};

struct HetroLastCopyDetails {
    std::string m_protocolVersion {};
    std::string m_metadataBackupType {};
    std::string m_backupFormat {};
    std::string m_backupFilter {};
    uint64_t m_lastBackupTime {};
    std::string m_oceanStorV5lastSnapshotName {};
    std::string m_isArchiveSupportHardlink {};

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_protocolVersion, protocolVersion)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_metadataBackupType, metadataBackupType)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupFormat, backupFormat)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupFilter, backupFilter)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_lastBackupTime, lastBackupTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_oceanStorV5lastSnapshotName, oceanStorV5lastSnapshotName)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_isArchiveSupportHardlink, isArchiveSupportHardlink)
    END_SERIAL_MEMEBER
};

struct AggCopyExtendInfo {
    std::string isAggregation;
    std::string metaPathSuffix;
    std::string dataPathSuffix;
    std::string maxSizeAfterAggregate;
    std::string maxSizeToAggregate;
    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(isAggregation, isAggregation)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(metaPathSuffix, metaPathSuffix)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(dataPathSuffix, dataPathSuffix)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(maxSizeAfterAggregate, maxSizeAfterAggregate)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(maxSizeToAggregate, maxSizeToAggregate)
    END_SERIAL_MEMEBER
};

const std::string DME_NAS_CONFIG_SECTION = "NasPlugInConfig";
const std::string SHARED_RSC_GENEAL_INFO_KEY = "geninfo-key";
const std::string HETRO_GLOBAL_SCAN_REDO_LIST = "hetro-global-scan-redo-list";
struct HetroNativeGeneral {
    time_t m_jobStartTime {};
    std::string m_protocolVersion {};
    std::string m_remoteNasShareSnapshotPath;
    std::string m_remoteNasShareSnapshotName;
    uint64_t m_remoteNasShareSnapshotTime {};
    uint64_t m_backupCopyPhaseStartTime {};
    uint64_t m_backupDelPhaseStartTime {};
    uint32_t m_restoreCopyIndex {0};
    uint32_t m_restoreDeleteIndex {0};

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_jobStartTime, JobStartTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_protocolVersion, ProtocolVersion)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_remoteNasShareSnapshotPath, ProtectShareSnapShotPath)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_remoteNasShareSnapshotName, ProtectShareSnapShotName)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_remoteNasShareSnapshotTime, ProtectShareSnapShotTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupCopyPhaseStartTime, FirstBackupCopySubTaskStartTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupDelPhaseStartTime, FirstBackupCopyDelTaskStartTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_restoreCopyIndex, RestoreCopyIndex)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_restoreDeleteIndex, RestoreDeleteIndex)
    END_SERIAL_MEMEBER
};

const std::string SHARED_RSC_SCANNER_STATS_KEY = "scan-stats-key";
struct HetroNativeScanStatistics {
    int m_scanStatus;                     /* Scan status (refer SCANNER_STATUS) */
    time_t m_scanStartTime = 0;           /* Scan start time */
    time_t m_remoteNasScanEndTime = 0;    /* Scan End time */
    time_t m_scanEndTime = 0;             /* Scan end time along with metadata write */
    uint64_t m_scanDuration = 0;          /* Total scan duration (in seconds) */
    uint64_t m_totDirs = 0;               /* Total num of dir detected in NAS Share */
    uint64_t m_totFiles = 0;              /* Total num of files detected in NAS Share */
    uint64_t m_totalSize = 0;             /* Total size of the NAS Share */
    uint64_t m_totDirsToBackup = 0;       /* Total num of dir (new/modified) to backup */
    uint64_t m_totFilesToBackup = 0;      /* Total num of files(new/modified) to backup */
    uint64_t m_totFilesDeleted = 0;       /* Total num of files to be deleted */
    uint64_t m_totDirsDeleted = 0;        /* Total num of dirs to be deleted */
    uint64_t m_totalSizeToBackup = 0;     /* Total size to backup */
    uint64_t m_totalControlFiles = 0;     /* Total Control Files Generated */
    uint64_t m_totFailedDirs = 0;         /* Total num of Failed dir detected in NAS Share */
    uint64_t m_totFailedFiles = 0;        /* Total num of Failed files detected in NAS Share */
    bool m_scanStarted = 0;

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_scanStatus, scanStatus)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_scanStartTime, scanStartTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_remoteNasScanEndTime, remoteNasScanEndTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_scanEndTime, scanEndTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_scanDuration, scanDuration)

    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totDirs, totDirs)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totFiles, totFiles)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totalSize, totalSize)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totDirsToBackup, totDirsToBackup)

    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totFilesToBackup, totFilesToBackup)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totFilesDeleted, totFilesDeleted)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totDirsDeleted, totDirsDeleted)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totalSizeToBackup, totalSizeToBackup)

    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totalControlFiles, m_totalControlFiles)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totFailedDirs, m_totFailedDirs)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_totFailedFiles, m_totFailedFiles)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_scanStarted, scanStarted)

    END_SERIAL_MEMEBER
};

const std::string SHARED_RSC_BACKUP_STATS_KEY  = "backup-stats-key";
struct HetroNativeBackupStats {
    uint32_t m_subJobPhrase       = 0;
    uint64_t m_noOfDirToBackup    = 0;        /* No of directories to be backed up */
    uint64_t m_noOfFilesToBackup  = 0;        /* No of files to be backed up */
    uint64_t m_noOfBytesToBackup  = 0;        /* No of bytes (in KB) to be backed up */
    uint64_t m_noOfDirToDelete    = 0;        /* No of directories to be deleted */
    uint64_t m_noOfFilesToDelete  = 0;        /* No of files to be deleted */
    uint64_t m_noOfDirCopied      = 0;        /* No of directories copied */
    uint64_t m_noOfFilesCopied    = 0;        /* No of files copied */
    uint64_t m_noOfBytesCopied    = 0;        /* No of bytes (in KB) copied */
    uint64_t m_noOfDirDeleted     = 0;        /* No of directories deleted */
    uint64_t m_noOfFilesDeleted   = 0;        /* No of files deleted */
    uint64_t m_noOfDirFailed      = 0;        /* No of directories failed to be copied/deleted */
    uint64_t m_noOfFilesFailed    = 0;        /* No of files failed to be copied/deleted */
    int64_t  m_lastLogReportTime  = 0;        /* Last time (epoch seconds) when we report log to PM */
    uint64_t m_noOfSrcRetryCount  = 0;        /* No of src side retry count */
    uint64_t m_noOfDstRetryCount  = 0;        /* No of dst retry count */
    uint64_t m_noOfFailureRecordsWritten = 0; /* No of backup failure records that have been written to file */
    uint64_t m_noOfFilesWriteSkip = 0;    /* No of files skipped to write (Ignore replace policy) */
    uint64_t m_skipFileCnt        = 0;        /* No of files skipped */

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_subJobPhrase, subJobPhrase)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfDirToBackup, noOfDirToBackup)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFilesToBackup, noOfFilesToBackup)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfBytesToBackup, noOfBytesToBackup)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfDirToDelete, noOfDirToDelete)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFilesToDelete, noOfFilesToDelete)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfDirCopied, noOfDirCopied)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFilesCopied, noOfFilesCopied)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfBytesCopied, noOfBytesCopied)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfDirDeleted, noOfDirDeleted)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFilesDeleted, noOfFilesDeleted)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfDirFailed, noOfDirFailed)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFilesFailed, noOfFilesFailed)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_lastLogReportTime, lastLogReportTime)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfSrcRetryCount, noOfSrcRetryCount)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfDstRetryCount, noOfDstRetryCount)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFailureRecordsWritten, noOfFailureRecordsWritten)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_noOfFilesWriteSkip, noOfFilesWriteSkip)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_skipFileCnt, skipFileCnt)
    END_SERIAL_MEMEBER

    HetroNativeBackupStats& operator += (const HetroNativeBackupStats& subJobStats) {
        m_noOfDirToBackup    += subJobStats.m_noOfDirToBackup;
        m_noOfFilesToBackup  += subJobStats.m_noOfFilesToBackup;
        m_noOfBytesToBackup  += subJobStats.m_noOfBytesToBackup;
        m_noOfDirToDelete    += subJobStats.m_noOfDirToDelete;
        m_noOfFilesToDelete  += subJobStats.m_noOfFilesToDelete;
        m_noOfDirCopied      += subJobStats.m_noOfDirCopied;
        m_noOfFilesCopied    += subJobStats.m_noOfFilesCopied;
        m_noOfBytesCopied    += subJobStats.m_noOfBytesCopied;
        m_noOfDirDeleted     += subJobStats.m_noOfDirDeleted;
        m_noOfFilesDeleted   += subJobStats.m_noOfFilesDeleted;
        m_noOfDirFailed      += subJobStats.m_noOfDirFailed;
        m_noOfFilesFailed    += subJobStats.m_noOfFilesFailed;
        m_noOfSrcRetryCount  += subJobStats.m_noOfSrcRetryCount;
        m_noOfDstRetryCount  += subJobStats.m_noOfDstRetryCount;
        m_noOfFailureRecordsWritten  += subJobStats.m_noOfFailureRecordsWritten;
        m_noOfFilesWriteSkip += subJobStats.m_noOfFilesWriteSkip;
        m_skipFileCnt += subJobStats.m_skipFileCnt;
        return *this;
    }
};

struct  HetroBackupSubJob {
    std::string m_ControlFile {};      // the control file while we receive in the call back of scanner/backupcopy phase
    uint32_t m_SubTaskType {};         // CopyPhase, DelPhase, HardLinkPhase, DirMTimePhase
    std::string metaFilePath;
    std::string dcacheAndFcachePath;
    std::string dataCachePath;
    std::string copyId;
    uint32_t orderNumberForAggregate {0};   // used in aggregate full restore. distinguishing the order of restore copy
    std::string m_orderOfRestore {"0"};
    std::string m_parentDir {};
    std::string m_Ext {};              // any parameters required in future

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_ControlFile, ControlFile)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_SubTaskType, SubTaskType)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(metaFilePath, metaFilePath)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(dcacheAndFcachePath, dcacheAndFcachePath)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(dataCachePath, dataCachePath)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(copyId, copyId)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(orderNumberForAggregate, orderNumberForAggregate)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_orderOfRestore, orderOfRestore)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_parentDir, parentDir)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_Ext, Ext)
    END_SERIAL_MEMEBER
};

struct HetroDataLayOutNasExtend {
    std::string m_autoIndex {};
    std::string m_metadataBackupType {};
    std::string m_proxyHostMode {};
    std::string m_backupFormat {};
    std::string m_fileReplaceStrategy {};
    std::string m_fileCountThreshold;
    std::string m_fileSizeThreshold;

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_autoIndex, auto_index)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_metadataBackupType, permissions_and_attributes)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_proxyHostMode, proxy_host_mode)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupFormat, small_file_aggregation)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fileReplaceStrategy, fileReplaceStrategy)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fileCountThreshold, fileCountThreshold)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fileSizeThreshold, fileSizeThreshold)
    END_SERIAL_MEMEBER
};

struct HetroBackupAggrExtend {
    std::string m_isAggregate;
    std::string m_maxSizeAfterAggregate;
    std::string m_maxSizeToAggregate;

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_isAggregate, small_file_aggregation)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_maxSizeAfterAggregate, aggregation_file_size)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_maxSizeToAggregate, aggregation_file_max_size)
    END_SERIAL_MEMEBER
};

struct HetroSmbProtectionConfig {
    std::string m_smbAclProtection;
    std::string m_smbHardlinkProtection;
    std::string m_backupHotData {"0"};
    std::string m_backupColdData {"0"};
    std::string m_isSparseFileDetection;

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_smbAclProtection, smb_acl_protection)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_smbHardlinkProtection, smb_hardlink_protection)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupHotData, backup_hot_data)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_backupColdData, backup_cold_data)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_isSparseFileDetection, sparse_file_detection)
    END_SERIAL_MEMEBER
};

struct HetroProtectAdvParms {
    std::string m_channels;
    std::string m_deployType;
    std::string m_agentIdScenarioMap;
    std::string m_fileCountThreshold;
    std::string m_fileSizeThreshold;

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_channels, channels)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_deployType, deployType)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_agentIdScenarioMap, agentIdScenarioMap)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fileCountThreshold, fileCountThreshold)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fileSizeThreshold, fileSizeThreshold)
    END_SERIAL_MEMEBER
};

struct HetroApplicationNasExtent {
    std::string m_serviceIP;
    std::string m_protocol;
    std::string m_authMode;
    std::string m_kerberosId;
    std::string m_filters;
    std::string m_username;
    std::string m_password;
    std::string m_encryption;
    std::string m_domainName;
    std::string m_isAutoScan;
    std::string m_shareId;
    std::string m_dtreeId;
    std::string m_fileSystemId;
    std::string m_sharePath;

    ~HetroApplicationNasExtent()
    {
        Module::CleanMemoryPwd(m_password);
    }

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_serviceIP, ip)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_protocol, shareMode)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_authMode, authMode)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_kerberosId, kerberosId)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_filters, filters)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_username, userName)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_password, passWord)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_encryption, encryption)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_domainName, domainName)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_isAutoScan, isAutoScan)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_shareId, share_id)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_dtreeId, dtree_id)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_fileSystemId, file_system_id)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_sharePath, share_path)
    END_SERIAL_MEMEBER
};

struct HetroApplicationNasAuthExtent {
    std::string krb5Conf {};
    std::string secret {};
    std::string keytab {};
    std::string configModel {};

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(krb5Conf, krb5Conf)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(secret, secret)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(keytab, keytab)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(configModel, configModel)
    END_SERIAL_MEMEBER
};

struct ProtectedNasShare {
    std::string id {};
    std::string sharePath {};
    Authentication auth {};
    HetroApplicationNasExtent nasShareExt {};
    HetroApplicationNasAuthExtent nasShareAuthExt {};
};

struct HetroApplicationProtectEnvExtent {
    std::string m_useSnapshot {};
    std::string m_verifyStatus {};
    std::string m_wwn {};

    BEGIN_SERIAL_MEMEBER
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_useSnapshot, snapConsistency)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_verifyStatus, verifyStatus)
    SERIAL_MEMBER_TO_SPECIFIED_NAME(m_wwn, wwn)
    END_SERIAL_MEMEBER
};

struct ProtectedNasHost {
    std::string id {};
    std::string name {};
    std::string vendor ;
    std::string vendorSubType {};
    std::string mgrIp {};
    std::string certification {};
    std::string crl {};
    int port {};
    Authentication auth {};
    HetroApplicationProtectEnvExtent nasHostExt;
};

struct SmbInitParams {
    std::string ip;
    std::string shareName;
    std::string version;
    std::string authType;
    std::string username;
    std::string password;
    std::string encryption;
    std::string krb5CcnameFile;
    std::string krb5ConfigFile;

    ~SmbInitParams()
    {
        Module::CleanMemoryPwd(password);
    }
};

constexpr auto MODULECOM_HETRO_COMMON = "HetroCommonService";

enum class SCANNER_TASK_STATUS {
    SCANNER_TASK_STATUS_INIT        = 0,
    SCANNER_TASK_STATUS_INPROGRESS  = 1,
    SCANNER_TASK_STATUS_SUCCESS     = 2,
    SCANNER_TASK_STATUS_ABORTED     = 3,
    SCANNER_TASK_STATUS_FAILED      = 4,
};

enum class NAS_CIFS_AUTH_TYPE_E {
    CIFS_AUTH_ERR        = -1,
    CIFS_AUTH_DOMAIN     = 1,
    CIFS_AUTH_PASSWORD   = 2,
};

enum class NAS_NFS_AUTH_TYPE_E {
    NFS_AUTH_ERR      = -1,
    NFS_AUTH_KERBEROS = 1,
};

enum class NAS_BACKUP_FORMAT_TYPE_E {
    BACKUP_FORMAT_TYPE_ERR                  = 0,
    BACKUP_FORMAT_TYPE_NATIVE               = 1,
    BACKUP_FORMAT_TYPE_ARCHIVE_AGGREGATE    = 2,
};

#endif